home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Developer Kits / Quark XTLite / Macintosh XTLite / MenuShell Folder / MenuShell.c < prev   
Encoding:
C/C++ Source or Header  |  1994-03-16  |  1.8 KB  |  67 lines  |  [TEXT/KAHL]

  1. /**************************************************************************\
  2. **
  3. **  MenuShell.c
  4. **
  5. **  Sample XTLite bulb to use as a starting point to add menu items.
  6. **
  7. **
  8. **  Copyright © 1993,1994 Quark Incorporated
  9. **  All Rights Reserved
  10. **
  11. \**************************************************************************/
  12.  
  13. #include "XTLite.h"
  14.  
  15. #define STRINGRESID    20000
  16. #define MENUSTRID        1
  17.  
  18. /**************************************************************************\
  19. **
  20. **  setupmenu
  21. **
  22. **  Setup for adding a menu item to the Utilities menu.
  23. **
  24. **  Entry: Storage for the text of the menu item.
  25. **
  26. **  Exit:  TRUE if you want to add your own menu item; FALSE if not.
  27. **
  28. \**************************************************************************/
  29. bool8 setupmenu(Str255 menustr)
  30. {
  31.     GetIndString(menustr,STRINGRESID,MENUSTRID);    /* get "Menu" String */
  32.     return (TRUE);
  33. }
  34.  
  35. void menucall(void)
  36. {
  37.     /* Put you own code here! */
  38.     SysBeep(1);
  39. }
  40.  
  41.  
  42. /**************************************************************************\
  43. **
  44. **  Remaining code tells XPress we don't want to handle filters or events.
  45. **
  46. \**************************************************************************/
  47. void setupfilter(OSType *fcreator,OSType *ftype,bool8 *importok,bool8 *exportok,
  48.     Str255 getstr,Str255 savestr,Str255 suffixstr)
  49. {
  50.     *importok = *exportok = FALSE;
  51. }
  52. uchar readchar(int16 fnum) {}
  53. void startread(int16 fnum) {}
  54. void readtext(int16 fnum,Str255 textbuffer,int32 *count,filtertxtattrib *textattribs,
  55.     filterparaattrib *paraattribs,RGBColor *textcolor) {}
  56. void endread(int16 fnum) {}
  57. void startwrite(int16 fnum) {}
  58. void writetext(int16 fnum,Str255 textbuffer,int32 count,filtertxtattrib *textattribs,
  59.     filterparaattrib *paraattribs,RGBColor *textcolor) {}
  60. void endwrite(int16 fnum) {}
  61.  
  62. bool8 setupidle(void)
  63. {
  64.     return (FALSE);
  65. }
  66. void idlecall(EventRecord *myevent) {}
  67.